import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [

  {
    path: '/',
    name: 'Layout',
 
    component: () => import(/* webpackChunkName: "Layout" */ '../views/Layout/index'),
    children:[{
      path: '/',
      name: 'Home',
   
      component: () => import(/* webpackChunkName: "Home" */ '../views/Layout/Home/index')
    },{
      path: '/list',
      name: 'List',
   
      component: () => import(/* webpackChunkName: "List" */ '../views/Layout/List/index')
    }]
  },
  {
    path: '/detail',
    name: 'Detail',
 
    component: () => import(/* webpackChunkName: "Detail" */ '../views/Detail/index')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
